/**
 * Copyright(c): 2017 com.mjduan All rights reserved.
 * 项目名：learn-spring-web
 * 注意：未经作者允许，不得外传
 */
package com.mjduan.project.web;

import java.util.Objects;
import java.util.Set;

import javax.servlet.ServletContainerInitializer;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.annotation.HandlesTypes;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.springframework.web.WebApplicationInitializer;

/**
 * 没有看到效果
 *
 * @author dmj1161859184@126.com 2018-08-18 23:52
 * @version 1.0
 * @since 1.0
 */
@HandlesTypes({WebApplicationInitializer.class})
public class ServletContainerInitializerImpl implements ServletContainerInitializer {
    private static final Logger LOGGER = LoggerFactory.getLogger(ServletContainerInitializerImpl.class);

    @Override
    public void onStartup(Set<Class<?>> c, ServletContext ctx) throws ServletException {
        LOGGER.info("方法是:onStartup");
        Objects.requireNonNull(ctx);
        for (Class<?> clazz : c) {
            LOGGER.info("类名:{}", clazz.getCanonicalName());
        }
    }
}
